
package main

import (
    "database/sql"
    "github.com/astaxie/beedb"
    _ "github.com/go-sql-driver/mysql"
    model "./lib/model/"
    "fmt"
)

var c = make(chan int, 10)
var a string



func helloKity() {
  a = "hello, world"
  c <- 0
}


func main() {

    db, err := sql.Open("mysql", "bhuser:363099@/bhdb_dev")
    if err != nil {
      fmt.Println(err)
    }

    orm := beedb.New(db)
    beedb.OnDebug=true

    var record model.CanRecords


    orm.Where("id=?", 4).Find(&record)

    fmt.Println(record.Activity_calory)

    fmt.Println(record.Left())


    fmt.Println(record)

    go helloKity()

    <-c

    fmt.Println(a)
    
}